Guided Practice 4.1

Consider the following data definition:

;; A ListOfStrings (LOS) is one of
;; -- empty
;; -- (cons String LOS)

Which of the following expressions have values that are LOS's?

  1. (cons "abc" empty)
  2. (cons "bcd")
  3. (cons "cde" (cons "ef" empty))
  4. (cons "3" (cons "4" empty))
  5. (cons 3 (cons 4 empty))

[ANSWER]


Last modified: Wed Aug 24 21:30:04 Eastern Daylight Time 2016